package com.zjsru.dao;

import com.zjsru.domain.Orders;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrdersMapper {
    @Select("select * from orders")
    @Results(id = "orderMap", value = {
            @Result(property = "product", column = "productId",
                    one = @One(select = "com.zjsru.dao.ProductMapper.selectByPrimaryKey"))
    })
    List<Orders> findAll();
}
